package com.st.sprinbootevent.listener;

import com.st.sprinbootevent.event.CustomEvent;
import com.st.sprinbootevent.event.UserEvent;
import org.springframework.context.ApplicationEvent;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;


/**
 * @author zhangli
 */
@Component
public class AnnotationListenerAll {

	//监听多个
	@EventListener({CustomEvent.class, UserEvent.class})
	public void onApplication( ) {
		System.out.println(this.getClass().getSimpleName()+"监听到：");
	}
}